﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;
using XbsWebAPI.EntityFrameworkCore.Entities.Enums;

namespace XbsWebAPI.Core.Repositories
{
    public interface IRepository<T> where T : class
    {
        public T Create(T entity);

        public Task<T> CreateAsync(T entity);

        public T Update(T entity);
        public Task<T> UpdateAsync(T entity);

        public T Delete(Guid id);

        public Task<T> DeleteAsync(Guid id);

        public T QueryById(Guid id);

        public IQueryable<T> Query(Expression<Func<T, bool>> filter);

        public IQueryable<T> AsQueryable();


    }
}
